#ifndef UNIONHMIDLL_H
#define UNIONHMIDLL_H

#include <QObject>
#include <QTimer>

#include "unionhmidll_global.h"
#include "PluginInterface/teccontrollerhmi_interface.h"
#include "WorkThreadManage/hmithreadmanage.h"
#include "WorkThreadManage/servercommange.h"

class UNIONHMIDLLSHARED_EXPORT UnionHmiDLL : public QObject{
    Q_OBJECT
public:
    UnionHmiDLL();
    ~UnionHmiDLL();
private:
    QTimer *HmiFastTimer;
    QTimer *HmiSlowTimer;

    HmiServer*   pHmiServer;
    HmiThread*   pHmiThread;
private:
    short UnionHmiMainWindowInit();
    short UnionHmiMainWindowRelease();

    short UnionHmiServerInit();
    short UnionHmiServerRelease();

    short UnionHmiDLLMainWindowShow();
    short UnionHmiRegHmiControlller2ServerTread();
    short UnionHmiTransHmiServerHandle2HmiThread();

    short UnionHmiTimerInit();
    short UnionHmiTimerRelease();
    short UnionHmiTimerStart();

public:
    short UnionHmiMainWindowWriteMessageBox(MessageType Type,const QString Data);
    short UnionHmiMainWindowWriteProgressBar(int value);

public slots:
    void UnionHmiFastTimerUpdate();
    void UnionHmiSlowTimerUpdate();
};

#endif // UNIONSYSTEMDLL_H
